<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>秒杀详情页</title>
    <link rel="stylesheet" th:href="@{../../lib/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{../../lib/font/css/font-awesome.min.css}"/>
    <link rel="stylesheet" th:href="@{../../css/seckill_item.css}"/>
    <link rel="stylesheet" th:href="@{../../css/public.css}"/>

</head>
<body>


<div id="app">
    <!-- header -->
    <div th:replace="public/header :: header"></div>


    <div class="container-fluid">
        <div class="row-fluid">
            <div class="col-md-12">
                <div class="page-header">
                    <h1 th:text="${seckill.title}">
                    </h1>
                </div>
                <div class="row-fluid">
                    <div class="col-md-2">
                    </div>
                    <div class="col-md-8">
                        剩余库存：<b th:text="${seckill.stockCount}"  style="font-size: 15px;"></b>
                        <div>
                            <span style="font-size: 15px;">开始时间：[[${#dates.format(seckill.startTime, 'yyyy-MM-dd HH:mm:ss')}]]</span>
                        </div>
                        <div>
                            <span style="font-size: 15px;">结束时间：[[${#dates.format(seckill.endTime, 'yyyy-MM-dd HH:mm:ss')}]]</span>
                        </div>
                        <div style="color: #ff0000d9;">
                            <h2>
                                <span id="seckill-time-span"></span>
                                <br/>
                                <br/>
                                <span id="seckill-box"></span>
                            </h2>
                        </div>
                    </div>
                    <div class="col-md-1">
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!--登录弹出层 输入电话-->
    <div id="killPhoneModal" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h3 class="modal-title text-center">
                        <span class="fa fa-phone fa-fw"> </span>秒杀电话:
                    </h3>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-8 col-xs-offset-2">
                            <input type="text" name="killPhone" id="killPhoneKey"
                                   placeholder="请输入电话号码" class="form-control">
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <!--验证信息-->
                    <span id="killPhoneMessage" style="margin-right: 40%;"></span>
                    <button type="button" id="killPhoneBtn" class="btn btn-success">
                        提交
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- footer -->
    <div th:replace="public/footer :: footer"></div>

</div>

</body>
<script type="text/javascript" th:src="@{../../lib/jquery-3.3.1.min.js}"></script>
<script type="text/javascript" th:src="@{../../lib/jquery.cookie.js}"></script>
<script type="text/javascript" th:src="@{../../lib/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{../../lib/countdown.js}"></script>
<script type="text/javascript" th:src="@{../../js/seckill_detail.js}"></script>


<!--&lt;!&ndash;<%&#45;&#45;jQery文件,务必在bootstrap.min.js之前引入&#45;&#45;%>&ndash;&gt;-->
<!--<script src="http://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js"></script>-->
<!--<script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>-->
<!--&lt;!&ndash;<%&#45;&#45;使用CDN 获取公共js http://www.bootcdn.cn/&#45;&#45;%>&ndash;&gt;-->
<!--&lt;!&ndash;<%&#45;&#45;jQuery Cookie操作插件&#45;&#45;%>&ndash;&gt;-->
<!--<script src="http://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>-->
<!--&lt;!&ndash;<%&#45;&#45;jQuery countDown倒计时插件&#45;&#45;%>&ndash;&gt;-->
<!--<script src="http://cdn.bootcss.com/jquery.countdown/2.1.0/jquery.countdown.min.js"></script>-->


<script type="text/javascript">
    $(function () {
        //使用表达式传入参数
        seckill.detail.init({
            seckillId: [[${seckill.seckillId}]],
            startTime: [[${seckill.startTime.time}]],//毫秒
            endTime: [[${seckill.endTime.time}]]
            //秒杀价钱
        });
    });
</script>
</html>